home *** CD-ROM | disk | FTP | other *** search
- Date: Mon, 3 Nov 1997 23:43:23 +0100
- From: Ernesto Poveda Poveda Cortes <ernie@ARRAKIS.ES>
- Subject: [IML] AREXX: New Jitter.irx With GUI!
-
- Hi Arexx folks!
-
- I have send a GUI version of Jitter.irx to Conny and he said me that it will
- be on his pages soon.
- I need you all to test it and help me in one question: I need to open GUI on
- Imagine Screen, but it is opened always in Workbench.
- I am using (so, you need this) MUIRexx to do the GUI.
-
- ---------------------------------
-
- Date: Wed, 5 Nov 1997 11:55:36 -0700
- From: Brian Jones <bjones@cadvision.com>
-
- You will have to promote Imagine's screen (which is private) to be
- a public screen. Use ModePro or TruePub.
-
- -Brian
-
- >> This is obsolete if you using IFA5.1 or later. It opens a own public
- screen <<
-
- ---------------------------------
-
- Date: Thu, 06 Nov 1997 22:30:57 +0100
- From: Ernesto Poveda Poveda Cortes <ernie@ARRAKIS.ES>
-
- El 04-nov-97, Salvatore Cagliari escribi=F3:
-
- >Hi Ernesto
-
- >Can you send a copy to please? At this time, i don't have time to try it=
- , but
- >this would be the first thing to try, when i have time.
-
- >Thanks you
- >Salvatore
-
- Of course, here you have (attached :-))
- If you want to have it into Imagine's own screen use TruePub to promote
- Imagine's Screen to public mode.
- Remember also that you will need MUIRexx 3.0+ to use this proggy...
-
- Hope you like this script!!
-
- Ernesto.
- mailto: ernie@arrakis.es
-
- /*
- ** $VER: JitterMUI.rexx 0.004 (23 Oct 1997) **
- **
- ** (c) 1997 Ernesto Poveda Cortes
- **
- ** PROGRAMNAME:
- ** JitterMUI.rexx
- **
- ** FUNCTION:
- ** Randomizes object points by an offset given.
- ** :: This is an Imagine 5+ Script ::
- ** ** Needs to live in ImRexx: (Assign)
- **
- ** $HISTORY:
- **
- ** 23 Oct 1997 : 0.04 : Full working.
- ** 23 Oct 1997 : 0.03 : fighting agains MUI!
- ** 23 Oct 1997 : 0.01 : initial release
- */
-
- portname=3D'JITTER'
-
- if show(P,portname) then do
- address VALUE portname
- "SHOW"
- end;else do
- address "COMMAND" "Run <NIL: >NIL: MUIREXX:MUIRexx PORT" portname
- address "COMMAND" "WaitForPort" portname
- end
-
- address JITTER
-
- MUIA_Gauge_Current =3D 0x8042f0dd
- MUIA_Gauge_Max =3D 0x8042bcdb
- MUIA_Gauge_Horiz =3D 0x804232dd
- MUIA_Window_CloseGadget =3D 0x8042a110
- MUIA_Window_Width =3D 0x8042dcae
- MUIA_Slider_Max =3D 0x8042d78a
- MUIA_Slider_Level =3D 0x8042ae3a
- MUIA_Group_HorizSpacing =3D 0x8042c651
- MUIA_Window_SizeGadget =3D 0x8042e33d
- FALSE =3D 0
- TRUE =3D 1
- MUIA_Disabled =3D 0x80423661
- Notify =3D 0x8042c9cb
- MUII_CheckMark =3D 15
- MUIA_Timer =3D 0x80426435
- MUIV_EveryTime =3D 0x49893131
- Selected =3D 0x8042654b
-
- options results
- comando=3D''
- xx=3D10
- yy=3D10
- zz=3D10
- Smooth=3D1 /* Attention!!! 1=3DDisabled 0=3DEnabled!!!*/
- SmoothLock=3D0 /* Attention!!! 0=3DDisabled 1=3DEnabled!!!*/
- SmoothValue=3D5
-
-
- parse arg comando w y z Smooth SmoothLock SmoothValue
- select
- when comando =3D 'GO' then do
- address JITTER slider ID SX
- w=3Dresult
- address JITTER slider ID SY
- y=3Dresult
- address JITTER slider ID SZ
- z=3Dresult
- address JITTER check ID smoo
- Smooth=3Dresult
- address JITTER check ID chk2
- SmoothLock=3Dresult
- address JITTER popslider ID pop1
- SmoothValue=3Dresult
- call jitter
- call BYE
- end
- when comando =3D 'FAST' then call jitter
- when comando =3D '' then call jitter_gui
- otherwise say comando
- end
-
- exit
-
- /* ------------------------------------------------------------------- */=
-
-
- jitter_gui:
- window ID JIT1 COMMAND """quit""" PORT JITTER TITLE """Jitter.irx"""
- group REGISTER LABELS "Offsets,Smooth options"
- group
- group HORIZ
- label LEFT "X"
- slider ID SX ATTRS MUIA_Slider_Max 255 MUIA_Slider_Level 10
- endgroup
- group HORIZ
- label LEFT "Y"
- slider ID SY ATTRS MUIA_Slider_Max 255 MUIA_Slider_Level 10
- endgroup
- group HORIZ
- label LEFT "Z"
- slider ID SZ ATTRS MUIA_Slider_Max 255 MUIA_Slider_Level 10
- endgroup
- endgroup
- group
- group ID sm1
- group HORIZ
- check ID SMOO COMMAND """group ID SM2 ATTRS "MUIA_Disabled" %s;""" P=
- ORT JITTER HELP """Enable/Disable Smooth Tool after randomiZer""" LABEL "=
- 1,0"
- label LEFT "Smooth Object?"
- space HORIZ 82
- endgroup
- group ID SM2 HORIZ
- check ID chk2 HELP """if checked, i will use the Lock option""" LAB=
- EL "0,1"
- label "Smooth Lock?"
- popslider ID pop1 HELP """This set the iterations passed \nto the s=
- mooth rutine""" ATTRS MUIA_Slider_Level 5
- label "How Much?"
- endgroup
- endgroup
- endgroup
- endgroup
- group HORIZ
- button PRESS COMMAND '"ImRexx:JitterMUI.irx GO"' LABEL "Ok!"
- button PRESS COMMAND """QUIT""" PORT JITTER LABEL "Cancel!"
- endgroup
- endwindow
- group ID SM2 ATTRS MUIA_Disabled 1
- return
-
- /* ------------------------------------------------------------------- */=
-
-
- jitter:
-
- text_warn1=3D"\033cPlease use me with \n\033c\033bImagine 5.0+"
- text_warn2=3D"\033cX=3D0 & Y=3D0 & Z=3D0 ??\n\033cYou Must use at least *=
- one* non zero value"
-
- window ID JIT1 CLOSE
- if ~show(P,'Imagine.1') then
- do
- call warn text_warn1
- call BYE
- end
-
- if ((w=3D=3D0) & (z=3D=3D0) & (y=3D=3D0)) then do
- call warn text_warn2
- call BYE
- end
-
- window ID WORK1 PORT JITTER TITLE """Working..."""
- space horiz 200
- group FRAME
- gauge ID GG1 ATTRS MUIA_Gauge_Horiz TRUE MUIA_Gauge_Max 100 MUIA_Gauge=
- _Current 1
- object CLASS "Scale.mui"
- button ID Abort1 PRESS PORT JITTER LABEL "Abort"
- endgroup
- endwindow
-
-
- CALL ADDLIB('rexxmathlib.library',0,-30,0)
-
- ADDRESS 'Imagine.1'
-
- displayrexxptr ON
- transform_translate 0 0 0 /*This will make the undo works :-)*/
- getgeometry
- getaxisinfo
-
- /* Diferent calls, diferent objects ...*/
- blaaa=3Drandom(,,time(s))
-
- address JITTER gauge ID GG1 MUIA_Gauge_Max pnt_num
-
- do i=3D 1 to pnt_num
- if w>0 then pnt_x.i =3D pnt_x.i+ random(0,w)
- if y>0 then pnt_y.i =3D pnt_y.i+ random(0,y)
- if z>0 then pnt_z.i =3D pnt_z.i+ random(0,z)
- address JITTER gauge ID GG1 MUIA_Gauge_Current i
- address JITTER button ID Abort1 Selected
- if result=3D1 then call BYE
- end
-
- setgeometry
-
- if smooth=3D0 then do
- if smoothlock=3D1 then smoothingtoollock smoothvalue
- else smoothingtool smoothvalue
- end
-
- return /* Jejejejejeje */
-
- /*-------------------------------------------------*/
-
- WARN:
- parse arg W1
- address JITTER request ID Warn1 Gadgets "Damn!" W1
- return
-
- BYE:
- address JITTER
- window id jit1 close
- window id work1 close
- quit
- address 'Imagine.1'
- ActivateImagine
- displayrexxptr OFF
- ImaginetoFront
- EXIT
-